package day2;

class A{
    public void m1(T1 t1) {
        System.out.println("111");
        t1.m2();
        System.out.println("222");
    }
}

interface T1{
    public abstract void m2();
}

public class Test2_Lambda {
    public static void main(String[] args) {
        A a = new A();

        /*a.m1(new T1() {
            @Override
            public void m2() {
                System.out.println("666");
            }
        });*/

        a.m1(() -> System.out.println("666"));
    }
}
